<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    /**
     * 获取最新公告信息
     *
     */
    public function notice()
    {
        $data = model('app\admin\model\Notice')->order('createtime','desc')->find();
        $this->success('请求成功',$data,200);
    }
}
